/*
===========================================================================
Copyright (C) 2005 Sarunas

This file is part of MyPIRC source code.

DisksDB source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

DisksDB source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with DisksDB; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
===========================================================================
*/
using System;

namespace MyIRC
{
	/// <summary>
	/// Channel interface. Has events for joining users, leaving, quiting,
	/// nick changes, topic changes, mode changes, messages, notices. Ability to write messages to channel,
	/// change topic, leave channel, change modes.
	/// </summary>
	public interface IChannel
	{
		event EventHandlerMessageAdded MessageAdded;
		event EventHandlerNoticeAdded NoticeAdded;
		event EventHandlerKicked Kicked;



		event EventHandlerDisconnectedChannel Disconnected;
		event EventHandlerTopicChanged TopicChanged;
		event EventHandlerNicksRecieved NicksRecieved;
		event EventHandlerTopicRecieved TopicRecieved;
		event EventHandlerUserJoinedChannel UserJoined;
		event EventHandlerUserPartedChannel UserParted;
		event EventHandlerModeChanged ModeChanged;
		event EventHandlerUserKicked UserKicked;
		event EventHandlerUserQuitedChannel UserQuited;
		event EventHandlerUserNickChanngedChannel NickChanged;
		event EventHandlerBansListRecieved BansListRecieved;
		event EventHandlerModesListRecieved ModesListRecieved;

		string Name
		{
			get;
		}

		System.Collections.ArrayList Nicks
		{
			get;
		}

		void SayTextLine(string text);
		void Part(string message);
		void SetMode(string mode);
		void Kick(string nick);
	}

	public delegate void EventHandlerMessageAdded(IConnection server, IChannel channel, IUser user, string message);
	public delegate void EventHandlerNoticeAdded(IConnection server, IChannel channel, IUser user, string message);
	/// <summary>
	/// You have been kicked of the channel
	/// </summary>
	public delegate void EventHandlerKicked(IConnection server, IChannel channel, IUser user, string who, string message);
}
